class routerEdgePoints{
    constructor() {}
    static getInstance(){
        if(!routerEdgePoints.instance) {
            routerEdgePoints.instance = new routerEdgePoints();
        }
        return routerEdgePoints.instance;
    }

    /**
     * 移除所有多边形的点
     * @param data
     */
    removeALLTerritory(data) {
        OBJECT.routerEdgePoints=[];
    }

    /**
     * 生成Territory
     * @param data
     */
    createTerritory( data )
    {
        this.removeALLTerritory();
        Polygon.deleteAllPloygon();
        data.forEach( function ( value ,index) {
                 let routerId = md5(new Date().getTime()+Math.random());
                 OBJECT.routerEdgePoints[routerId] = value.router_edge_points;
                 OBJECT.routerPonits[routerId]=[];
                 OBJECT.routersNameMap[routerId] = value.title;
                 Server.getInstance().assignPointToPolygon();
                 Polygon.draw(  value.router_edge_points ,map , routerId);
        },this);
    }
}